package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GardenUserInfoMapper;
import com.ruoyi.system.domain.GardenUserInfo;
import com.ruoyi.system.service.IGardenUserInfoService;

/**
 * 花园用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-02
 */
@Service
public class GardenUserInfoServiceImpl implements IGardenUserInfoService 
{
    @Autowired
    private GardenUserInfoMapper gardenUserInfoMapper;

    /**
     * 查询花园用户信息
     * 
     * @param id 花园用户信息主键
     * @return 花园用户信息
     */
    @Override
    public GardenUserInfo selectGardenUserInfoById(Long id)
    {
        return gardenUserInfoMapper.selectGardenUserInfoById(id);
    }

    /**
     * 查询花园用户信息列表
     * 
     * @param gardenUserInfo 花园用户信息
     * @return 花园用户信息
     */
    @Override
    public List<GardenUserInfo> selectGardenUserInfoList(GardenUserInfo gardenUserInfo)
    {
        return gardenUserInfoMapper.selectGardenUserInfoList(gardenUserInfo);
    }

    /**
     * 新增花园用户信息
     * 
     * @param gardenUserInfo 花园用户信息
     * @return 结果
     */
    @Override
    public int insertGardenUserInfo(GardenUserInfo gardenUserInfo)
    {
        gardenUserInfo.setCreateTime(DateUtils.getNowDate());
        return gardenUserInfoMapper.insertGardenUserInfo(gardenUserInfo);
    }

    /**
     * 修改花园用户信息
     * 
     * @param gardenUserInfo 花园用户信息
     * @return 结果
     */
    @Override
    public int updateGardenUserInfo(GardenUserInfo gardenUserInfo)
    {
        gardenUserInfo.setUpdateTime(DateUtils.getNowDate());
        return gardenUserInfoMapper.updateGardenUserInfo(gardenUserInfo);
    }

    /**
     * 批量删除花园用户信息
     * 
     * @param ids 需要删除的花园用户信息主键
     * @return 结果
     */
    @Override
    public int deleteGardenUserInfoByIds(Long[] ids)
    {
        return gardenUserInfoMapper.deleteGardenUserInfoByIds(ids);
    }

    /**
     * 删除花园用户信息信息
     * 
     * @param id 花园用户信息主键
     * @return 结果
     */
    @Override
    public int deleteGardenUserInfoById(Long id)
    {
        return gardenUserInfoMapper.deleteGardenUserInfoById(id);
    }
}
